<template>
  <div>
    <h3>调用猫眼数据</h3>
  </div>
</template>

<script>
// 引入模块顺序建议：首先内置模块，其次第三方模块，再次自定义模块，最后样式
import axios from 'axios';
import Loading from "@/components/Loading";

export default {
  name: "App",
  async mounted(){
    // Access to XMLHttpRequest at 'https://i.maoyan.com/api/mmdb/movie/v3/list/hot.json?ct=%E4%B8%8A%E6%B5%B7&ci=10&channelId=4' from origin 'http://localhost:8085'
    // has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    // const {data} = await axios.get("https://i.maoyan.com/api/mmdb/movie/v3/list/hot.json?ct=上海&ci=10&channelId=4")
    // const {data} = await axios.get("http://localhost8089/maoyan");
    // console.log(data.data.hot);
    // one
    // axios.get("/one")

    // two
    // axios.get("/two/api/mmdb/movie/v3/list/hot.json?ct=上海&ci=10&channelId=4");

    // /three
    // axios.get("/three/api/mmdb/movie/v3/list/hot.json?ct=上海&ci=10&channelId=4");


    // /four
    // axios.get("/four/hot.json?ct=上海&ci=10&channelId=4")

    // api
    // axios.get("/api/mmdb/movie/v3/list/hot.json?ct=上海&ci=10&channelId=4")

    // zhang
    // axios.get("/zhang/info");

    // my
    const {data} = await axios.get("/my/maoyan");
    console.log(data);

  }
}
</script>